#!/usr/bin/python3
# coding:utf-8
import json
from conftest import BASE_DIR

#构造测试数据
def build_data():
    test_data = []
    test_desc=[]
    file = BASE_DIR + r"/data/order.json"
    with open(file, encoding="utf-8") as f:
        json_data = json.load(f)

        for case_data in json_data:
            desc=case_data.get("desc")
            login_data = case_data.get("params").get('id')
            message = case_data.get("msg")

            test_data.append((desc,*(login_data),*(message)))
            test_desc.append(desc)
        #print(test_desc)
    return test_data ,test_desc

if __name__ == '__main__':
    build_data()
    print(build_data()[0])